/**
 * 报表设计公司(2011)
 */
package com.reportgear.designer.action;

import javax.swing.JToggleButton;

/**
 * 单选事件
 * 
 * @version 1.0 2011-3-24
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 */
public abstract class RadioAction extends UndoableAction {

	// 组名称
	private String groupName = "";

	public RadioAction() {
		setToggleButton(true);
	}

	public String getGroupName() {
		return groupName;
	}

	public boolean isSelected() {
		final JToggleButton btn = (JToggleButton) createToolBarComponent();

		return btn.isSelected();
	}

	public void setGroupName(String paramString) {
		groupName = paramString;
	}

	public void setSelected(boolean selected) {
		final JToggleButton btn = (JToggleButton) createToolBarComponent();

		btn.setSelected(selected);
	}

}
